﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics;

namespace WDA.Config.Database
{
	internal sealed class Service : IService
	{
		#region Memebrs
		private readonly int _id;
		private readonly string _name;
		private readonly string _uri;
		private readonly string _monitorUri;
		private readonly string _interfaceName;
		private readonly string _monitorInterfaceName;
		private readonly string _implementationName;
		private readonly int? _basePort;
		private readonly IHost _host;
		#endregion

		internal Service(int id, string name, string uri, string monitorUri, string interfaceName, string implementationName, string monitorInterfaceName, int? basePort, IHost host)
		{
			_id = id;
			_name = name;
			_uri = uri;
			_monitorUri = monitorUri;
			_interfaceName = interfaceName;
			_implementationName = implementationName;
			_monitorInterfaceName = monitorInterfaceName;
			_basePort = basePort;
			_host = host;
		}

		#region IService Members
		public string Name
		{
         [DebuggerStepThrough]
			get { return _name; }
		}

		public string Uri
		{
         [DebuggerStepThrough]
			get { return _uri; }
		}

		public string InterfaceName
		{
         [DebuggerStepThrough]
			get { return _interfaceName; }
		}

		public string ImplementationName
		{
         [DebuggerStepThrough]
			get { return _implementationName; }
		}

		public string MonitorInterfaceName
		{
         [DebuggerStepThrough]
			get { return _monitorInterfaceName; }
		}

		public IHost Host
		{
         [DebuggerStepThrough]
			get { return _host; }
		}		

		public string MonitorUri
		{
         [DebuggerStepThrough]
			get { return _monitorUri; }
		}

		public int? BasePort
		{
			[DebuggerStepThrough]
			get { return _basePort; }
		}
		#endregion
	}
}
